package net.xdclass.feign;

import net.xdclass.request.LockCouponRecordRequest;
import net.xdclass.util.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Classname CouponFeignService
 * @Description TODO
 * @Date 2022/5/24 17:00
 * @Created by sunhao
 */
@FeignClient(value = "xdclass-coupon-service")
public interface CouponFeignClient {
  /**
   * 获取优惠券领取详情
   */
  @GetMapping(value = "/api/coupon_record/v1/detail/{record_id}")
  JsonData findUserCouponRecordById(@PathVariable(value = "record_id") long recordId);

  @PostMapping(value = "/api/coupon_record/v1/lock_records")
  JsonData lockCouponRecord(@RequestBody LockCouponRecordRequest lockCouponRecordRequest);
}
